import sys

from PyQt6 import QtCore, QtWidgets, QtGui
from PyQt6.QtCore import Qt
from PyQt6.QtGui import QIcon
from PyQt6.QtWidgets import QMainWindow, QApplication

from pic_shop import Ui_MainWindow


class pic_shop_main(QMainWindow, Ui_MainWindow):
    def __init__(self):
        super(pic_shop_main, self).__init__()
        self.setupUi(self)
        self.setWindowIcon(QIcon('image/img.png'))
        self.setWindowTitle("pic_shop")

        # toolBar 添加工具栏
        self.tbrMain = QtWidgets.QToolBar(self)
        self.tbrMain.setObjectName("tbrMain")
        self.addToolBar(QtCore.Qt.ToolBarArea.TopToolBarArea, self.tbrMain)

        # 左侧工具栏
        self.tbrPanel = QtWidgets.QToolBar(self)
        self.tbrPanel.setObjectName("tbrPanel")
        self.addToolBar(QtCore.Qt.ToolBarArea.RightToolBarArea, self.tbrPanel)

        self.tbrFilter = QtWidgets.QToolBar(self)
        self.tbrFilter.setObjectName("tbrFilter")
        self.addToolBar(QtCore.Qt.ToolBarArea.RightToolBarArea, self.tbrFilter)

        self.actOpen = QtGui.QAction(self)
        self.actOpen.setObjectName("actOpen")
        self.actSave = QtGui.QAction(self)
        self.actSave.setObjectName("actSave")
        self.actSaveAs = QtGui.QAction(self)
        self.actSaveAs.setObjectName("actSaveAs")
        self.actQuit = QtGui.QAction(self)
        self.actQuit.setObjectName("actQuit")
        self.actCircle = QtGui.QAction(self)
        self.actCircle.setCheckable(True)
        self.actCircle.setObjectName("actCircle")
        self.actRect = QtGui.QAction(self)
        self.actRect.setCheckable(True)
        self.actRect.setObjectName("actRect")
        self.actCut = QtGui.QAction(self)
        self.actCut.setObjectName("actCut")
        self.actCopy = QtGui.QAction(self)
        self.actCopy.setObjectName("actCopy")
        self.actPaste = QtGui.QAction(self)
        self.actPaste.setObjectName("actPaste")
        self.actBlackWhite = QtGui.QAction(self)
        self.actBlackWhite.setObjectName("actBlackWhite")
        self.actMultiColour = QtGui.QAction(self)
        self.actMultiColour.setObjectName("actMultiColour")
        self.actRatio = QtGui.QAction(self)

        self.actRatio.setObjectName("actRatio")
        self.actHorizontal = QtGui.QAction(self)
        self.actHorizontal.setObjectName("actHorizontal")
        self.actVertical = QtGui.QAction(self)
        self.actVertical.setObjectName("actVertical")
        self.actRotateLeft = QtGui.QAction(self)
        self.actRotateLeft.setObjectName("actRotateLeft")
        self.actRotateRight = QtGui.QAction(self)
        self.actRotateRight.setObjectName("actRotateRight")
        self.actZoomIn = QtGui.QAction(self)
        self.actZoomIn.setObjectName("actZoomIn")
        self.actZoomOut = QtGui.QAction(self)
        self.actZoomOut.setObjectName("actZoomOut")
        self.actWaterMark = QtGui.QAction(self)
        self.actWaterMark.setObjectName("actWaterMark")
        self.actContrast = QtGui.QAction(self)
        self.actContrast.setObjectName("actContrast")
        self.actColor = QtGui.QAction(self)
        self.actColor.setObjectName("actColor")
        self.actBright = QtGui.QAction(self)
        self.actBright.setObjectName("actBright")
        self.actSharp = QtGui.QAction(self)
        self.actSharp.setObjectName("actSharp")
        self.actPanel = QtGui.QAction(self)
        self.actPanel.setObjectName("actPanel")
        self.actCompose = QtGui.QAction(self)
        self.actCompose.setObjectName("actCompose")
        self.actFace = QtGui.QAction(self)
        self.actFace.setObjectName("actFace")

        self.menu_1.addAction(self.actOpen)
        self.menu_1.addAction(self.actSave)
        self.menu_1.addAction(self.actSaveAs)
        self.menu_1.addSeparator()
        self.menu_1.addAction(self.actQuit)
        self.menu_1.addAction(self.actCircle)
        self.menu_1.addAction(self.actRect)



if __name__ == '__main__':
    app = QApplication(sys.argv)
    main = pic_shop_main()
    # 设置固定大小及窗口置顶
    main.setWindowFlags(Qt.WindowType.MSWindowsFixedSizeDialogHint |
                        Qt.WindowType.WindowStaysOnTopHint)

    main.show()
    sys.exit(app.exec())
